<template>
    <div>
        <el-dialog v-model=" pro" title="新增" width="500px">
            <el-form :model="form" label-position="left" size="large" :rules="rules">
                <el-form-item label="分类名称" :label-width="formLabelWidth" prop="name">
                    <el-input v-model="form.name" autocomplete="off" />
                </el-form-item>
                <el-form-item label="是否显示" :label-width="formLabelWidth" prop="region">
                    <el-select v-model="form.region"  placeholder="请选择是否显示">
                        <el-option label="显示" :value="1" />
                        <el-option label="不显示" :value="0" />
                    </el-select>

                </el-form-item>
            </el-form>
        </el-dialog>
    </div>
</template>

<script setup lang="ts">
import { ref } from "vue";


const emits = defineEmits(["update:dialogFormVisible", "update:form"]);
const formLabelWidth = "100px";
const pro = defineModel<boolean>("pro");
const rules = ref({
    name: [{ required: true, message: "Please input Activity name", trigger: "change" }],
    region: [{ required: true, message: "Please select Activity zone", trigger: "change" }],
    date1: [{ type: "date", required: true, message: "Please pick a date", trigger: "change" }],
    date2: [{ type: "date", required: true, message: "Please pick a time", trigger: "change" }],
    type: [{ required: true, message: "Pleaseselect Activity type", trigger: "change" }],
});
const form = ref({
    name: "",
    region: "",
    date1: "",
    date2: "",
    delivery: false,
    type: [],
    resource: "",
    desc: "",
});
</script>

<style scoped lang="scss">

</style>